package OOP;

// final class is not inheritable
final public class Immutable {
    // final attribute must be initialized in constructor or definition
    final public int value;
    final public String demo = "yes";

    public Immutable(int value) {
        this.value = value;
    }

    // final method cannot be overridden
    final void method() {
    }

    public static void main(String[] args) {
        final String s = "hello";
        System.out.println("final variable [s] is a constant value, [s] = " + s);
    }
}
